﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using Artemis.Core;
using System.Data.Common.CommandTrees;

namespace Artemis.Data.ProxyProvider
{
    public class ProxyProviderServices : DbProviderServicesBase
    {
        static ProxyProviderServices()
        {
            Instance = new ProxyProviderServices();
        }

        /// <summary>
        /// Prevents a default instance of the EFCachingProviderServices class from being created.
        /// </summary>
        private ProxyProviderServices()
        {

        }

        public override DbCommandDefinitionWrapper CreateCommandDefinitionWrapper(DbCommandDefinition wrappedCommandDefinition,
                                                        DbCommandTree commandTree)
        {
            return new ProxyCommandDefinition(wrappedCommandDefinition, commandTree);
        }

        /// <summary>
        /// Gets the singleton instance of <see cref="CachingProviderServices"/>.
        /// </summary>
        /// <value>The singleton instance.</value>
        public static ProxyProviderServices Instance { get; private set; }

        protected override string ProviderInvariantName
        {
            get { return "Artemis.Data.ProxyProvider"; }
        }

        protected override string DefaultWrappedProviderName
        {
            get { return string.Empty; }
        }
    }
}
